Skip to main content

Some Distributions Related to the Normal

The Normal and Sums of Normals

The sum of independent normally distributed random variables is also normally distributed.

Details

The sum of independent normally distributed random variables is also normally distributed. More specifically, if X1N(μ1,σ12)X_1 \sim N(\mu_1, \sigma_{1}^2) and X2N(μ2,σ22)X_2 \sim N(\mu_2, \sigma_{2}^2) are independent, then X1+X2N(μ,σ2)X_1 + X_2 \sim N(\mu, \sigma^2), since μ=E[X1+X2]=μ1+μ2\mu = E \left[ X_1 + X_2 \right] = \mu_1 + \mu_2 and\ σ2=Var[X1+X2]\sigma^2 = Var \left[ X_1 + X_2 \right] with σ2=σ12+σ22\sigma^2 = \sigma_{1}^2 + \sigma_{2}^2 \ if X1X_1 and X2X_2 are independent.

Similarly

i=1nXi\displaystyle\sum_{i=1}^{n} X_i

is normal if X1,,XnX_1, \ldots, X_n are normal and independent.

Examples

Example: Simulating and plotting a single normal distribution.

YN(0,1)Y \sim N(0,1)

library(MASS) # for truehist
par(mfcol=c(2,2))
y <- rnorm(1000) # generating 1000 N(0,1)
mn <- mean(y)
vr <- var(y)
truehist(y,ymax=0.5) # plot the histogram
xvec <-seq(-4,4,0.01) # generate the x-axis
yvec <- dnorm(xvec) # theoretical N(0,1) density
lines(xvec,yvec,lwd=2,col="red")
ttl <- paste("Simulation and theory N(0,1)\n", "mean=",round(mn,2), "and variance=",round(vr,2))
title(ttl)
Example: Sum of two normal distributions

Y1N(2,22)Y_1 \sim N(2, 2^2)

and

Y2N(3,32)Y_2 \sim N(3, 3^2)

y1 <- rnorm(10000,2,2) # N(2,2^2)
y2 <- rnorm(10000,3,3) # N(3, 3^2)
y <- y1+y2
truehist(y)
xvec <- seq(-10,20,0.01)
mn<-mean(y)
vr <- var(y)
cat("The mean is",mn,"\n")
cat("The variance is ",vr,"\n")
cat("The standard deviation is", sd(y), "\n")
yvec <- dnorm(xvec,mean=5,sd=sqrt(13)) # N() density
lines(xvec,yvec,lwd=2,col="red")
ttl <- paste("The sum of N(2,2^2) and N(3,3^2)\n", "mean=",round(mn,2), "and variance=", round(vr,2))
title(ttl)
Example Sum of nine normal distributions, all with μ=42\mu = 42 and σ2=22\sigma^2=2^2.
ymat <- matrix(rnorm(10000*9,42,2),ncol=9)
y <- apply(ymat,1,mean)
truehist(y)
mn <- mean(y)
vr <- var(y)
cat("The mean is",mn,"\n")
cat("The variance is ",vr,"\n")
cat("The standard deviation is",sd(y),"\n")
# plot the theoretical curve
xvec <- seq(39,45,0.01)
yvec <- dnorm(xvec,mean=5,sd=sqrt(13)) # N() density
lines(xvec,yvec,lwd=2,col="red")
ttl <- paste("The sum of nine N(42^2) \n", "mean=",round(mn,2), "and variance=",round(vr,2))
title(ttl)

The Chi-square Distribution

If XN(0,1)X \sim N(0,1),then Y=X2Y = X^2 has a distribution which is called the chi-square distribution ( χ2\chi^2 ) on one degree of freedom. This can be written as:

Yχ2Y \sim \chi^2

Fig. 34

Details

Definition

If X1,X2,,XnX_1, X_2, \ldots, X_n are i.i.d. N(0,1)N(0,1) then the distribution of Y=X12+X12++Xn2Y = X_1^2 + X_1^2 + \ldots + X_n^2 has a square ( χ2\chi^2 )distribution.

Sum of Chi-square Distributions

Let Y1Y_1 and Y2Y_2 be independent variables. If Y1=χν12Y_1 = \chi^2_{\nu_1} and Y2=χν22Y_2 = \chi^2_{\nu_2}, then the sum of these two variables also follows a chi-squared ( χ2\chi^2) distribution:

Y1+Y2=χν1+ν22Y_1 + Y_2 = \chi^2_{\nu_1+ \nu_2}

Fig. 35

Details

Note

Recall that if

X1,,XnN(μ,σ2)X_1, \ldots, X_n \sim N (\mu, \sigma^2)

are i.i.d., then

i=1n(Xˉμσ)2=i=1n(Xˉμ)2σχ2\displaystyle\sum_{i=1}^n \left ( \displaystyle\frac {\bar{X} - \mu} {\sigma}\right ) ^2= \displaystyle\sum_{i=1}^n \displaystyle\frac {\left ( \bar{X} - \mu\right ) ^2} {\sigma}\sim \chi^2

Sum of Squared Deviation

If X1,,XnN(μ,σ2)X_1,\cdots,X_n \sim N(\mu,\sigma^2) i.i.d, then

i=1n(Xiμσ)2χn2,\displaystyle\sum_{i=1}^n \left ( \displaystyle\frac{X_i-\mu}{\sigma} \right )^2 \sim \chi_{n}^2,

but we are often interested in

1n1i=1n(XiXˉ)2χn12\displaystyle\frac{1}{n-1}\displaystyle\sum_{i=1}^n (X_i-\bar{X})^2\sim \chi_{n-1}^2

Details

Consider a random sample of Gaussian random variables, i.e. X1,,XnN(μ,σ2)X_1,\cdots,X_n \sim N(\mu,\sigma^2) i.i.d. Such a collection of random variables have properties which can be used in a number of ways.

i=1n(Xiμσ)2χn2\displaystyle\sum_{i=1}^n \left ( \displaystyle\frac{X_i-\mu}{\sigma} \right )^2 \sim \chi_{n}^2

but we are often interested in

1n1i=1n(XiXˉ)2χn12\displaystyle\frac{1}{n-1}\displaystyle\sum_{i=1}^n (X_i-\bar{X})^2\sim \chi_{n-1}^2

Note

A degree of freedom is lost because of subtracting the estimator of the mean as opposed to the true mean.

The correct notation is:

μ\mu := population mean

Xˉ\bar{X} := sample mean (a random variable)

xˉ\bar{x} := sample mean (a number)

The TT distribution

If UN(0,1)U\sim N(0,1) and Wχν2W\sim\chi^{2}_{\nu} are independent, then the random variable

T=UwνT=\displaystyle\frac{U}{\sqrt{\displaystyle\frac{w}{\nu}}}

has a distribution which we call the TT distribution on ν\nu degrees of freedom denoted TtνT \sim t_{\nu}.

Details

Definition

If UN(0,1)U\sim N(0,1) and Wχν2W\sim\chi^{2}_{\nu} are independent, then the random variable

T:=UwνT:=\displaystyle\frac{U}{\sqrt{\displaystyle\frac{w}{\nu}}}

has a distribution which we call the TT distribution on ν\nu degrees of freedom, denoted TtνT \sim t_\nu.

It turns out that if X1,,XnN(μ,σ2)X_1, \ldots,X_n \sim N(\mu,\sigma ^2) and we set:

Xˉ=1ni=1nXi\bar{X}=\displaystyle\frac{1}{n}\displaystyle\sum_{i=1}^n X_i

and

S=11ni=1n(XiX)2S= \sqrt{\displaystyle\frac{1}{1-n}\displaystyle\sum_{i=1}^n (X_i-X)^2}

then

XˉμS/ntn1\displaystyle\frac{\bar{X}-\mu}{S/\sqrt{n}} \sim t_{n-1}

This follows from Xˉ\bar{X} and Σi=1N(XiXˉ)2\Sigma_{i=1}^N(X_i-\bar{X})^2 being independent and Xˉμσ/nN(0,1)\displaystyle\frac{\bar{X}-\mu}{\sigma/\sqrt{n}}\sim N(0,1), (XiXˉ)2σ2χn12\displaystyle\sum \displaystyle\frac{(X_i-\bar{X})^2}{\sigma^2}\sim \chi_{n-1}^2.